Can't execute bat or cmd files.  opens notepad
I've checked the forums and looked at the registry. The following key doesn't exist under \.BAT. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.BAT\UserChoice I've tried running the registry fix "bat_fix_w7.reg" and get a message " Cannot import. Not all data was successfully written to the registry. Some keys are open by the system or other purposes. Other user accounts on my PC (Windows-7) don't have this behavior. I don't know how or why this behavior started. I may have inadvertently left mouse clicked something or other. Does anybody have any other suggestions?
October 19th, 2012 12:54pm

You need to be local amdin when you import registry files. If you are having problems with running any bat files then you probably have assosiated .bat files with NotePad. Go to Control Panel\All Control Panel Items\Default Programs\Set Associations check the associations for ".cmd" and ".bat" files You can also try open with then select the "cmd".
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2012 1:54pm

I believe I've already looked into Default Programs>-set Associations. The ".bat" and ".cmd" lists "Unknown Application". I should also note: I log on to my PC with my AD Domain Accounts. Unfortunately the Domain Administrator account that I use has just started with this problem. I've also used another Domain Administrator account that hasn't been used in years and logged onto my Win-7 PC. It also has this same issue. A third Domain Account (non Domain-Admin) doesn't have this issue. Now when I logon with this third account where I can run a batch file and then open a CMD prompt, with RunAs User of my Domain Administrator Account, the problem occurs. Therefore, I believe the Issue my be with the profile on my PC with the certain Domain accounts. I then blew away the profile, "C:\Users\AccountName" for the Domain Admin Accounts havine the problem. I also removed that account from The Local Admin group, reboot and re-added the account to the local admin group. When I logged on with that Domain Admin account, I got a new desktop but the problem persists. Still can't find the problem.
October 19th, 2012 4:08pm

Yes, Ive tries importing the .reg file as local administrator. Still didn't import.
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2012 4:09pm

Under HKEY\Classes\Root, do you have entries for "batfile" and "cmdfile" with numerous entries under them? Under \batfile\runas, what is your default (mine is "%SystemRoot%\System32\cmd.exe /C "%1" %*")? Under \runasuser, I have an {86C86720-xx......} string. Under \cmdfile\runas, I have the same command as under batfile, and under \runasuser, a different string. Both of them have the path to Notepad under \edit and \print, and "%1" %* under \open. Maybe there's a problem there in the registry? Just a guess. (I miss the WinXP method of editing extensions. Much easier than Win7.) SC Tom
October 19th, 2012 6:45pm

Well, I finally got it working. NOTE: The "bat_fix_w7.reg" merge still fails or does not completely finish merging all the entries, but I can now run .bat files instead of opening notepad. Not totally sure when the fix actually happened. Probably after a reboot of running the .reg merge from the local administrator account or fromthe local Administrator account from safe-mode and rebooting. however in both instances the full merge issued the failed to completely merge all entries. The "bat_fix_w7.reg" merge probably had most of the changes work and fix the problem. It's rather misleading. I agree that in Win7 this remedy is more difficult than with previous associations in WinXP. Thanks for all the replies. kwbatzer
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2012 9:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics